<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>WelCome to HuNan University JudgeOnline</title>
    <link rel="stylesheet" href="style/nav.css" >
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" href="css/bootstrap.min.css">

    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">

    <!-- editor.md的css文件 -->
    <link rel="stylesheet" href="plugs/editormd/css/editormd.css" />
    <link rel="stylesheet" href="plugs/editormd/css/editormd.preview.min.css" />

    <!-- jQuery (Bootstrap 的所有 JavaScript 插件都依赖 jQuery，所以必须放在前边) -->
    <script src="js/jquery-3.3.1.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="js/bootstrap.min.js"></script>
    <script src="js/jquery.media.js"></script>
    <!-- editor.md的js文件 -->
    <script src="plugs/editormd/lib/marked.min.js"></script>
    <script src="plugs/editormd/lib/prettify.min.js"></script>
    <script src="plugs/editormd/lib/raphael.min.js"></script>
    <script src="plugs/editormd/lib/underscore.min.js"></script>
    <script src="plugs/editormd/editormd.js"></script>
    <!-- 自己的js文件 -->
    <script src="js/controller.js"></script>
    <script src="js/myajax.js"></script>
    <script src="js/filter.js"></script>
</head>
<body>
    <div class="container">
        <!-- page head -->
        <div class="head-logo">
            <img alt="hnulogo" src="img/hnulogo.gif">
            <h2>Welcome To Hunan University Judge Online</h2>
            <img alt="acmlogo" src="img/acm.png" class="img-circle icpc" />
        </div>
        <div class="masthead">
            <ul class="nav nav-pills">
                <li id="home"><a href="index">Home</a></li>
                <li id="problem"><a href="problemset">Problem</a></li>
                <li id="contest"><a href="contest">Contest</a></li>
                <li id="status"><a href="status">Status</a></li>
                <li id="rank"><a href="rank">Rank</a></li>
                <li id="user"><a href="discuss">Discuss</a></li>
                <li id="about"><a href="fas">FAQ</a></li>
                <li class="pull-right" id="info">
                    <button type="button" class="btn btn-primary" onclick="preLogin()">Login</button>
                    <button type="button" class="btn btn-primary" onclick="preRegister()">Register</button>
                </li>
            </ul>
        </div>

        <!-- Site content-->
        <div class="row">
            <img id="myimg" alt="verifyCode">
        </div>

        <button id="here" type="button" class="btn">here</button>
        <!-- <div id="test-editormd"></div>
        <div>
            <button id="getMarkdown" type="button" class="btn" class="btn btn-default">MarkdownCode</button>
            <button id="getHtml" type="button" class="btn" class="btn btn-default">HtmlCode</button>
        </div>
        <div id="content"></div> -->

        <!-- Site footer -->
        <div>
            <input id="textInput" value="" />
            <button type="button" id="submit">GO</button>
        </div>
        <footer class="footer">
            <p>&copy; HNU ACM Team | <a href="#">Contact Us</a> | Version 2018</p>
            <p>Developer：balabala</p>
        </footer>
  
    </div>
</body>
<script>
    document.getElementById("here").onclick = function() {
        getVerifyCode("myimg");
        setTimeout('console.log(sessionStorage.getItem("uuid").toString())', 1000);
    };
    // var testEditor;
    // $.get({
    //     url: "http://localhost/data/template.md",
    //     success: function(md) {
    //         testEditor = editormd("test-editormd", {
    //             width: "100%",
    //             height: 740,
    //             path : 'plugs/editormd/lib/',
    //             markdown : md,
    //             codeFold : true,
    //             saveHTMLToTextarea : true,
    //             searchReplace : true,
    //             emoji : true,
    //             taskList : true,
    //             tex : true,                   // 开启科学公式TeX语言支持，默认关闭
    //             imageUpload : true,
    //             imageFormats : ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
    //             imageUploadURL : "./php/upload.php",
    //             onload : function() {
    //                 //this.fullscreen();
    //                 //this.unwatch();
    //                 //this.watch().fullscreen();

    //                 //this.setMarkdown("#PHP");
    //                 //this.width("100%");
    //                 //this.height(480);
    //                 //this.resize("100%", 640);
    //             }
    //         });
    //         editormd.markdownToHTML("content", {
    //             markdown        : md ,
    //             htmlDecode      : "style,script,iframe",
    //             tocm            : true,
    //             emoji           : true,
    //             taskList        : true,
    //             tex             : true,  // 默认不解析
    //         });
    //     }
    // })
    // $("#getMarkdown").click(function() {
    //     console.log(testEditor.getMarkdown());
    // });
    // $("#getHtml").click(function() {
    //     console.log(testEditor.getHTML());
    // });
    // filter();
    $("#submit").click(function() {
        var t = document.getElementById("textInput").value;
        alert(checkName(t));
    })
    var t = null;
    alert(isBlank(t));
</script>
<script src="js/afterLoad.js"></script>
</html>